```tsx
import { useState } from "react"

export function ControlledCheckbox() {
  const [checked, setChecked] = useState(false)

  const service = useMachine(checkbox.machine, {
    checked,
    onCheckedChange(details) {
      setChecked(details.checked)
    },
  })

  return (
    // ...
  )
}
```
